package com.wangbo.multi.exception.enums;

import com.wangbo.multi.exception.BaseExceptionEnum;
import lombok.AllArgsConstructor;

/**
 * @Package: com.company.demo
 * @Author: Mr.Waves
 * @Date: 2020-03-05 20:03
 * @Description: 未授权异常
 **/
@AllArgsConstructor
public enum UnauthorizedExceptionEnum implements BaseExceptionEnum {

    AUTHENTICATE_ERROR(401,"账号认证失败"),
    ACCOUNT_LOCKED(401,"账号已被锁定，请联系管理员解锁"),
    ACCOUNT_INVALID(401,"账号无效，请检查用户名输入"),
    TOKEN_EXPIRED(401,"用户凭证已过期，请重新登录"),
    TOKEN_MISSING(401,"您的请求没有携带凭证"),
    TOKEN_INVALID(401, "请使用有效token!"),
    PERMISSION_DENIED(401,"您没有执行该操作的权限")
    ;

    private Integer code;
    private String message;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
